Image processing method and apparatus

ABSTRACT

An object of the present invention is to provide an image processing apparatus which allows a user to execute image processing, such as extraction and elimination of a portion common to a plurality of images therefrom, with a simple operation. An image of a document is read by a scanner, and when the document is a first one, the image of the document is stored from input means into storing means. When an image of a second document is read, comparing means compares the read image with the image stored in the storing means to judge whether or not a difference in pixel values between the first document image and the second document image is smaller than a threshold value set through setting means. A portion in which the difference in pixel values is judged smaller than the threshold value is recognized as a common portion, and in accordance with a result of selection by selecting means, the portion is sent as a result of extracting the portion common to the plurality of inputted images therefrom, to an image processing section via output means and printed by a printing mechanism, or the respective images from which the common portion is eliminated are sent from the output means to the image processing section and outputted by the printing mechanism.

This is a divisional patent application of U.S. patent application Ser.No. 09/474,191 filed Dec. 29, 1999, by Tadao Morishita (the sameinventor as of this divisional application), entitled “Image ProcessingMethod and Apparatus” now U.S. Pat. No. 6,836,568.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing method andapparatus such as a copier, provided with functions of inputting andoutputting an image, and in addition, capable of subjecting an inputtedimage to a predetermined process and outputting the image.

2. Description of the Related Art

In a digital copier which reads and outputs an image, the followingwell-known techniques are used: a technique of synthesizing a pluralityof documents into a single document and outputting the single document;and an inserting and synthesizing technique of subjecting a maskingprocess to an arbitrarily predetermined region of a document and therebyinserting another document into the document. Such a synthesizingtechnique as mentioned above is described in Japanese Unexamined PatentPublication JP-A 5-145735 (1993), for example. In this prior art, theuser operates operating means such as an edit pad to set a trim regionin an image from which trim region an image is extracted. The extractedimage is inserted into a mask region in another image which is a baseimage, to be synthesized. By adding a twist to a method of specifying amask region, it is possible to eliminate an unnecessary image regionfrom an extracted image.

JP-A 5-145735 discloses elimination of an unnecessary image region byspecifying a mask region. However, in the case of, for example, ahand-written note which is overwritten on a printed matter, it isdifficult to definitely separate the note as a mask region, so that itis difficult to eliminate the note only by adding a twist to a method ofspecifying a mask region. Moreover, since it is necessary to prepare adisplay device and a terminal device such as operating means so that theuser can specify a mask region, the overall apparatus tends to beupsized, and it gets hard to use the apparatus with ease.

Further, Japanese Unexamined Patent Publication JP-A 63-163678 (1988)discloses an automatic image checking apparatus for checking images oftwo objects, e.g., prints of seals. The automatic image checkingapparatus extracts checking objects from the respective images on thebasis of a portion common to the images of the two objects, and executesa checking process on the basis of the checking objects extracted fromthe respective images. At the time of extracting the checking objects,after the images of the two objects are mutually registered, an initialmask pattern is formed by considering a pixel density value of 1 or moreto be 1 in the respective images while ANDing both the images, and afinal mask pattern is generated by expanding the initial mask pattern.The images of the two objects are subjected to masking, respectively, byusing the final mask pattern, with the result that the checking objectsof the respective images are extracted. In JP-A 63-163678, a pixeldensity value of 1 or more is replaced with 1, so that the difference indensity values of pixels, each of which has a pixel density value of 1or more, is not reflected on extraction of a portion common to images oftwo objects therefrom.

Furthermore, Japanese Unexamined Patent Publication JP-A 5-231837 (1993)discloses a shape measuring method for working out the shape of asoldered part which is given to an electronic component on a packingboard. In the shape measuring method, an angle of illumination to thesoldered part given to the electronic component on the packing board issequentially changed. At every predetermined angle, regular reflectionlight from the soldered part is picked up. For the purpose ofeliminating an image of wiring or the like which is common to bothimages, data of the images shot at every predetermined angle aresubjected to a process of subtracting one from the other. On the basisof data of the images obtained in the subtracting process, thethree-dimensional shape of the soldered part is worked out. In JP-A5-231837, the data of the images is subjected to a process ofsubtracting for each pixel as it is, so that the magnitude of thedifference in pixel values is not reflected on elimination of an imagecommon to both images.

SUMMARY OF THE INVENTION

An object of the invention is to provide an image processing method andapparatus capable of carrying out image processing such as eliminationof an unnecessary portion, with a simple operation.

The invention provides an image processing apparatus comprising atleast:

input means for carrying out a distribution process of image informationinputted through an image input mechanism;

storing means for storing an image inputted through the input means;

comparing means for comparing an image inputted through the input meanswith an image stored in the storing means; and

output means for outputting a result of comparison by the comparingmeans,

wherein the comparing means includes calculating means for calculating adifference in pixel values which represent pixel densities, between animage newly inputted through the input means and an image stored in thestoring means, and recognizing means for recognizing a portion common toimages by comparing an output of the calculating means with a presetthreshold value.

According to the invention, image information inputted through the inputmeans is stored in the storing means, and an image newly inputtedthrough the input means is compared with the image stored in the storingmeans, by the comparing means. The comparing means includes thecalculating means for calculating the difference in pixel values, whichrepresent pixel densities, between a newly inputted image and the storedimage, and the recognizing means for recognizing a portion common to theimages by comparing an output of the calculating means with a thresholdvalue, so that only by sequentially inputting image information into theinput means, image processing based on recognition of a portion commonto the images can be carried out.

As shown above, according to the invention, the comparing means comparesan image newly inputted to the input means with an image stored in thestoring means, and a comparison result is outputted from the outputmeans. In the comparing means, the calculating means calculates thedifference in pixel values between the image inputted through the inputmeans and the image stored in the storing means, and the recognizingmeans recognizes a portion common to the images by comparing an outputof the calculating means with a threshold value. A result of comparisonby the comparing means contains a result of recognition of the portioncommon to the images by the recognizing means, so that only by inputtingimages, the user is capable of obtaining a result of image processingbased on the portion common to the images.

Further, in the invention it is preferable that:

at least three or more kinds of image information are sequentiallyinputted to the input means;

the output means replaces an image outputted from the comparing meanswith an image stored in the storing means; and

the recognizing means recognizes a portion common to an image newlyinputted through the input means and the image stored in the storingmeans by comparing the images.

According to the invention, while sequentially inputting three or morekinds of images, the user is capable of making the apparatussequentially carry out image processing based on recognition of aportion common to an image inputted immediately before and a newlyinputted image and extract the common portion in a reliable manner. Asshown above, according to the invention, while sequentially inputting atleast three or more kinds of image information, the user is capable ofmaking the apparatus recognize a common portion and sequentially carryout image processing based on a result of recognition of the commonportion.

Still further, in the invention it is preferable that the comparingmeans includes extracting means for causing the output means to outputonly a pixel of which the difference in pixel values calculated by thecalculating means is equal to or less than the threshold value.

According to the invention, extracting means included in the comparingmeans causes the output means to output only a pixel of which thedifference in pixel values calculated by the calculating means is equalto or less than the threshold value, so that it is possible to make theapparatus output as an image, only a common portion in which thedifference in pixel values is equal to or less than the threshold value.As shown above, according to the invention, the calculating meanscalculates the difference in pixel values, and the extracting meanscauses the output means to output only a pixel of which the differencein pixel values is equal to or less than the threshold value, so that itis possible to make the apparatus output as an image, only a commonportion in which the difference in pixel values is smaller than thethreshold value.

Still further, in the invention it is preferable that the comparingmeans includes eliminating means for causing, when the difference inpixel values calculated by the calculating means is equal to or lessthan the threshold value, the output means to output the inputted imageand the stored image as two images, while preventing a pixel of whichthe difference in pixel values is equal to or less than the thresholdvalue, from being outputted into the respective images.

According to the invention, the comparing means includes the eliminatingmeans, so that when the difference in pixel values calculated by thecalculating means is equal to or less than the threshold value, it ispossible to make the apparatus eliminate a common portion in which thedifference in pixel values is equal to or less than the threshold value,from an inputted image and a stored image, and output both the images.As shown above, according to the invention, the image processingapparatus can output an inputted image and a stored image from theoutput means, respectively, when the difference in pixel values is equalto or less than the threshold value, so that the apparatus can outputthe images from which a common portion is eliminated in a simple manner.

Still further, in the invention it is preferable that the comparingmeans includes extracting means for causing the output means to outputonly a pixel of which the difference in pixel values calculated by thecalculating means is equal to or less than the threshold value, andeliminating means for causing, when the difference in pixel valuescalculated by the calculating means is equal to or less than thethreshold value, the output means to output the inputted image and thestored image as two images, while preventing a pixel of which thedifference in pixel values is equal to or less than the threshold value,from being outputted thereinto,

the apparatus further comprises selecting means for selecting one of theextracting means and the eliminating means which are included in thecomparing means, to be put into operation.

According to the invention, the user can select through the selectingmeans, either extracting a common portion in which the difference inpixel values is equal to or less than the threshold value by theextracting means and outputting the common portion, or eliminating thecommon portion by the eliminating means and outputting images. As shownabove, according to the invention, the apparatus is equipped with both afacility to extract a common portion from images to output the commonportion as an image and a facility to eliminate a common portion fromimages to output the images, and capable of activating both thefacilities selectively.

Still further, an image processing apparatus of the invention furthercomprises setting means for allowing the user to set the thresholdvalue.

According to the invention, the image processing apparatus is equippedwith the setting means for allowing the user to set a threshold valueused in comparison of the differences in pixel values between theinputted image and the stored image in recognizing a portion common tothe images by the recognizing means included in the comparing means, sothat the user is capable of arbitrarily setting a level of thedifference in pixel values which is recognized as a common portion, andmaking the apparatus recognize a common portion properly in accordancewith the density of an inputted image and carry out image processingwith a recognition result reflected. As shown above, according to theinvention, the user is capable of using the setting means to set athreshold value used for comparing the difference in pixel values, sothat the user is capable of setting an allowable range of the differencein pixel values between images which is recognized as a common portion,and regulating a status of recognizing a common portion in accordancewith the density of an image to be processed.

BRIEF DESCRIPTION OF THE DRAWINGS

Other and further objects, features, and advantages of the inventionwill be more explicit from the following detailed description taken withreference to the drawings wherein:

FIG. 1 is a block diagram showing a schematic diagram of an imageprocessing apparatus of an embodiment of the invention;

FIG. 2 is a simplified plan view of a color digital copier to which theimage processing apparatus of FIG. 1 is applied;

FIG. 3 is a partial plan view showing a configuration of an operatingsection 22 which is mounted on the color digital copier of FIG. 2;

FIG. 4 is a flow chart showing steps of a processing procedure duringoperation of an extracting facility in the image processing apparatus ofFIG. 1;

FIG. 5 is a flow chart showing the details of a step of a comparingprocess in the flow chart of FIG. 4;

FIG. 6 is a flow chart showing steps of a processing procedure duringoperation of an eliminating facility in the image processing apparatusof FIG. 1;

FIG. 7 is a flow chart showing the details of a step of a comparingprocess in the flow chart of FIG. 6;

FIG. 8 is a view showing images which can be obtained during operationof the extracting facility shown by FIGS. 4, 5; and

FIG. 9 is a view showing images which can be obtained during operationof the eliminating facility shown by FIGS. 6, 7.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Now referring to the drawings, preferred embodiments of the inventionare described below.

FIG. 1 shows a schematic configuration of an image processing apparatuswhich is applied to a color digital copier, as an embodiment of theinvention. Image information is read from a document by an image inputmechanism formed by a scanner 1 or the like. The image input mechanismreads the document as a collection of pixels, and outputs by convertingeach pixel to 8 bits of digital data from 0 to 255 in accordance withthe density of each pixel. In the case of reading a color image, theimage input mechanism outputs by converting the respective components ofRGB primary colors of red, green and blue to digital data from 0 to 255in accordance with the density of each pixel. An output is the densestwhen a value is 255, while an output is colorless, that is, printing isnot carried out when a value is 0. This output value will be expressedas a pixel value hereinafter. A CCD (charge coupled device) sensor whichreads an image from a document one-dimensionally or two-dimensionally isincluded in the image input mechanism, and the size of a pixel to beread is determined corresponding to the size of a light-receiving deviceincluded in the CCD sensor and the configuration of an optical systemsuch as a lens included in the image input mechanism 1.

In a case where the scanner 1 reads a plurality of documents, it cannotbe avoided that a positional displacement is caused between thedocuments. A document positional displacement detecting device 2 storesthe position of a document put on a document base, and when a newdocument is put on, the device 2 compares the position of the newdocument with the position of the previous document, thereby detecting apositional displacement between the documents. Detection of a positionaldisplacement between documents is carried out by using an output fromthe scanner 1, for example, relative to the position of a specificcorner of a rectangular document.

A signal which corresponds to an image of a document read by the scanner1 is inputted to input means 3, and sent to either comparing means 4 orstoring means 5. The comparing means 4 can work as calculating means 4 awhich has a calculating function, recognizing means 4 b which has arecognizing function, extracting means 4 c which has an extractingfunction, and eliminating means 4 d which has an eliminating function,respectively, which will be described later. The storing means 5 isconstituted by a semiconductor memory, a disk device and the like, andcapable of storing an image inputted to the input means 3 as datacomposed of pixel values of respective pixels. The comparing means 4 isalso capable of comparing an image inputted to the input means 3 with animage stored in the storing means 5. Outputting means 6 outputs an imageto be subjected to image processing in accordance with a result ofcomparison by the comparing means 4. Selecting means 7 selects afunction of the comparing means 4 from the extracting function and theeliminating function. Setting means 8 sets a threshold value which isused when the comparing means 4 compares images. A common imagerecognition processing section 10 includes the input means 3, thecomparing means 4, the storing means 5, the output means 6, theselecting means 7, and the setting means 8, which are explained above.

An image outputted from the output means 6 of the common imagerecognition processing section 10 is sent to either color correctingmeans 11 or the storing means 5, depending on each case. The outputmeans 6 also has a function of sending an image read out of the storingmeans 5 to the color correcting means 11. The details of the processingmethod will be described later. The color correcting means 11 carriesout color correction of an inputted color image. Black producing means12 produces a black component from an inputted color image. Filterprocessing means 13 corrects a space frequency response, therebycarrying out a filter process so as to prevent a blur and granularitydeterioration of an outputted image. Halftone processing means 14processes the tone of an image so as to become suitable for print of animage processing result at a printing mechanism 15. The printingmechanism 15 outputs and prints an image of the image processing resultonto a recording medium such as a sheet of paper. The color correctingmeans 11, the black producing means 12, the filter processing means 13,the halftone processing means 14, and the printing mechanism 15 composean image processing section 20 which is an equivalent one mounted in acolor digital copier in general.

FIG. 2 shows an example of a plan view of the color digital copier shownby FIG. 1. On the top of the color digital copier, an almost horizontaldocument base 21 is placed. The document base 21 is made of transparentglass or the like, and a document is put on the top face of the documentbase 21 so that a surface from which an image is read points downward.Below the document base 21, the scanner 1 is placed. The document base21 has a rectangular shape, and the scanner 1 has a length almost equalto a length of a shorter side of the document base 21, so that thescanner 1 can read an image of a document one-dimensionally. The scanner1 is movable along a longer side of the document base 21, and capable ofreading an image of a document two-dimensionally while moving. The colordigital copier is operated through an operating section 22, and anoutputted image having been subjected to image processing is ejected toa document ejecting tray 23.

FIG. 3 is an example of a configuration of the operating section 22shown by FIG. 2. The operating section 22 is provided with a displaypanel 24 formed by a liquid crystal display (LCD) device or the like.The display panel 24 displays directions to operate the color digitalcopier, a working status of the copier, a warning of a positionaldisplacement of a document, and the like. An extracting button 25 and aneliminating button 26 which switch a function of the comparing means 4of FIG. 1 to the extracting function or the eliminating function (theselecting means 7) are placed in the vicinity of the display panel 24 ofthe operating section 22. A threshold value used when the comparingmeans 4 compares images can be set by operating a threshold valuesetting section 27 (the setting means 8). The threshold value settingsection 27 includes sliding knobs for individually setting thresholdvalues for the respective components of primary colors of red, blue andgreen of a color image. When the knobs of the threshold value settingsection 27 are adjusted and threshold values are set for the respectivecolors, signals representing the threshold values are supplied to thecomparing means 4.

FIG. 4 shows steps of an operation of extracting a common portion fromthree documents in the image processing apparatus shown by FIG. 1.First, at step a1, the user conducts an operation of putting a firstdocument A on the document base 21 shown in FIG. 2 and pushing apre-scan button 28 shown in FIG. 3. The scanner 1 reads an image of thedocument A while moving, and image information representing a read imageis supplied from the input means 3 to the storing means 5, where theimage information is stored and preserved.

At step a2, the user removes the first document A from the document base21, and puts a second document B on the document base 21. The documentpositional displacement detecting device 2 shown in FIG. 1 detects apositional displacement between the document A and the document B. In acase where a positional displacement is detected, the display panel 24displays the fact to warn the user. When warned, the user corrects theposition of the document B so that the positional displacement betweenthe documents is solved. At step a3, the user pushes the extractingbutton 25 to designate the extracting function. When necessary, the usersets a threshold value through the knobs of the threshold value settingsection 27. Next, when the pre-scan button 28 is pushed, the copierstarts scanning the document B. When scanning the document B is started,the comparing means 4 compares on a pixel-by-pixel basis, an image ofthe document B read by scanning with the image of the document A storedin the storing means 5 at step a4. A comparison result is stored in thestoring means 5.

When scanning the document B and comparing the document B with thedocument A for all the pixels are finished, the user removes thedocument B from the document base 21 and puts a third document C on thedocument base 21 at step a5. The document positional displacementdetecting device 2 detects a positional displacement of the document Cwith respect to the document A, and warns the user through the displaypanel 24 in a case where a displacement is detected. When a displacementexists, the user corrects the position of the document C to solve thepositional displacement. Next, at step a6, the user pushes an outputbutton 29 to start scanning of the document C. Image information on thedocument C read by the scanner 1 is compared with the storage contentsin the storing means 5 on a pixel-by-pixel basis by the comparing means4 at step a7. In the storing means 5, a portion common to the document Aand the document B is stored, and as a result of comparing the documentC with the storage contents, an image of a portion common to thedocuments A, B and C is supplied as a comparison result from thecomparing means 4 to the output means 6. When all of the pixels of thedocument C are scanned and compared, image processing needed forprinting is carried out by the color correcting means 11 through thehalftone processing means 14 included in the image processing section 20at step a8. At step a9, an image processing result is printed by theprinting mechanism 15.

In the case of subjecting N sheets of documents to the extractingprocess (wherein N denotes an integral number of 4 or more), second to(N−1)^(th) documents are processed by repeating steps a2 to a4, and anN^(th) document is processed at steps a5 to a7. As shown in FIG. 4, inthe process of extracting a common portion, it is possible to easilyproduce a master document from documents among which a master documentis not present, for example, by eliminating only written-in portionsfrom documents of printed matters with the same contents in which notesare written in and printing the documents, or extracting and printingonly portions of frames and the same sentences from a plurality ofquotes or the like with the same base style.

FIG. 5 shows the contents of the process of comparing images carried outat steps a4, a7 of FIG. 4. At step b1, a pixel value P1 (X, Y) of acoordinate position (X, Y) of an image stored in the storing means 5 isread out. At step b2, a pixel value P2 (X, Y) corresponding to thecoordinate position (X, Y) read out of the storing means 5 is inputtedto an image inputted through the input means 3. At step b3, thecalculating means 4 a included in the comparing means 4 calculates adifference D between the pixel values in accordance with a firstexpression as shown below:D=|P1(X,Y)−P2(X,Y)|  (1)

Assuming a threshold value set through the threshold value settingsection 27 to be T, the comparing means 4 judges whether D≦T, that is, asecond expression as shown below is held or not:D=|P1(X,Y)−P2(X,Y)|≦T  (2)

When it is judged that the condition is held at step b3, they arerecognized as a common portion, and the pixel value P1 (X, Y) stored inthe storing means 5 is outputted from the comparing means via the outputmeans 6 at step b4. When it is judged that the condition is not held atstep b3, the comparing means 4 outputs a value of zero to the outputmeans 6 at step a5.

In the case of processing a color image, steps as shown below will befollowed. In this case, an image stored in the storing means 5 isdenoted by P1, in which the primary-color components of red, green, andblue are respectively denoted by P1 r, P1 g, P1 b, and an image inputtedthrough the input means 3 is denoted by P2, in which the primary-colorcomponents of red, green, and blue are respectively denoted by P2 r, P2g, P2 b. Further, the absolute values of the respective differencesbetween P1 r and P2 r, P1 g and P2 g, P1 b and P2 b are denoted by Dr,Dg, Db, and the threshold values of the respective primary-colorcomponents set through the threshold value setting section 27 aredenoted by Tr, Tg, Tb. In a case where Dr≦Tr and Dg≦Tg and Db≦Tb areheld, they are recognized as a common portion, and the pixel value P1(X, Y) is sent to the output means 6. On the other hand, in a case whereDr>Tr or Dg>Tg or Db>Tb is held, a value of zero is sent to the outputmeans 6 as a pixel value. In the case of carrying out a process ofoutputting from two documents, a pixel value of a result of comparisonby the comparing means 4 is sent from the output means 6 to the imageprocessing section 20. In the case of carrying out a process ofextracting from three or more documents, a result of comparison by thecomparing means 4 is sent from the output means 6 to the imageprocessing section 20 only when the last document is compared, and atother times, a result of comparison by the comparing means 4 is sentfrom the output means 6 to the storing means 5 and replaced with datapreviously stored in the storing means.

Extracting from three or more documents a portion common thereto makesit possible to extract a common portion more precisely than extractingfrom two documents a portion common thereto. For example, althoughhand-written notes which are overlapped by coincident in two documentswould be extracted and outputted as a common portion as they are, such acoincidental overlap is less possible in three or more documents, andtherefore, a common portion can be extracted more precisely.

Subsequently, working steps in the case of eliminating a portion commonto two documents therefrom will be illustrated referring to FIG. 6. Fordifferentiation between the two documents, they are expressed as adocument A and a document B, respectively. First, at step c1, thedocument A is read in the same manner as at step a1 of FIG. 4. At stepc2, the following document B is subjected to detection of a positionaldisplacement in the same manner as at step a2 of FIG. 4. Operationsconducted by the user are also the same as at steps a1, a2 of FIG. 4. Atstep c3, the user pushes the eliminating button 26 to designate theeliminating function. The user sets a threshold value through thethreshold value setting section 27 when necessary. Next, when the userpushes the output button 29, the copier starts scanning the document B.At step c4, the comparing means 4 carries out the comparing process. Allthe pixels of the document B are sequentially subjected to the comparingprocess, and a common portion is eliminated. At step c5, an image isgiven for each pixel from the output means 6 to the image processingsection 20, where the image is processed, and at step c6, the image isprinted by the printing mechanism 15 onto a recording medium such as asheet of paper. Next, at step c7, the image of the document A stored inthe storing means 5 is read out by the output means 6 and sent to theimage processing section 20, and at step c8, the image is printed by theprinting mechanism 15. With these steps, when two documents withdifferent contents contain the same unnecessary image such as a ruledline of a notebook or a steady noise due to a defect of the printingmechanism, it is possible to produce a document by eliminating theunnecessary image from the two documents.

FIG. 7 shows the contents of the comparison process carried out at stepc4 of FIG. 6. At steps d1, d2, in the same manner as at steps b1, b2 ofFIG. 5, a stored pixel value P1 (X, Y) and an inputted pixel value P2(X, Y) are read out. At step d3, the calculating means 4 a included inthe comparing means 4 compares the two kinds of read pixel values P1 (X,Y), P2 (X, Y), and calculates the absolute value D of the differencebetween the pixel values P1, P2 in accordance with the same expressionas the first expression. Then, it is judged whether or not the conditionshown by a third expression as shown below is held for the absolutevalue D and the threshold value T (step d3):D=|P1(X,Y)−P2(X,Y)|>T  (3)

When it is judged that the above condition is held, the pixel value P1(X, Y) stored in the storing means 5 is not changed at step d4, and theinputted pixel value P2 (X, Y) is sent to the output means 6 andoutputted at step d5. When it is judged that the above condition is notheld at step d3, the pixel value P1 (X, Y) stored in the storing means 5is replaced with a value of zero at step d6, and the value of zeroinstead of the inputted pixel value P2 (X, Y) is sent to the outputmeans 6 and outputted at step d7.

In the case of processing a color image, in the same manner as theextraction mode described before, the components of RGB primary colorsare respectively subjected to the same comparison process as at step d3by using the absolute values Dr, Dg, Db of the differences between P1and P2 and threshold values Tr, Tg, Tb. In a case where Dr>Tr or Dg>Tgor Db>Tb is held, the pixel value P1 (X, Y) stored in the storing means5 is not changed, and the inputted pixel value P2 (X, Y) is sent to theoutput means 6. In a case where Dr≦Tr and Dg≦Tg and Db≦Tb are held, thepixel value P1 (X, Y) stored in the storing means 5 is replaced with avalue of zero, and the value of zero instead of the inputted pixel valueP2 (X, Y) is sent to the output means 6.

FIG. 8 shows a status of eliminating a non-common portion 31 a containedin an image 31 of the document A and a non-common portion 32 a containedin an image 32 of the document B and outputting an image 33 whichcontains only a common portion, with steps of FIGS. 4, 5. For example,the non-common portions 31 a, 32 a contained in the images 31, 32 areportions of hand-written notes, which do not exist at identicalpositions in the documents A and B.

FIG. 9 shows a status of eliminating common portions 41 a, 42 a fromimages 41, 42 of the two documents A and B and outputting images 43, 44,with steps of FIG. 6, 7. For example, the common portions 41 a, 42 a areruled lines and frames, and the images 43, 44 are outputted after thecommon portions 41 a, 42 a are eliminated.

Although the embodiment illustrated above shows an example, in a colordigital copier, of reading a plurality of documents to extract andoutput a common portion as an image, and to eliminate a common portionand output images of the respective documents, the invention can beapplied to image processing of not only an inputted image directly readfrom a document, but also image data previously stored in a recordingmedium, and an image transmitted via communication network. Further, theinvention can be utilized not only in recognizing a common portion toextract and output the common portion as an image or to eliminate thecommon portion from images, but also in checking of detecting asimilarity level among a plurality of images.

As illustrated above, in the image processing method of the invention,an image is outputted in such a manner that an inputted image is storedon a pixel-by-pixel basis as pixel values which represent pixeldensities, pixel values of a newly inputted image are compared with thepixel values of the stored image, a portion common to the newly inputtedimage and the stored image is recognized, and the common portion issubjected to predetermined image processing. Thus, only by inputting animage, it is possible to make the apparatus perform image processingbased on recognition of a common portion. Since an operation such assetting a region is not required, it is possible to make the apparatusperform image processing based on recognition of a common portion easilyand speedily. As described above, an image is outputted in such a mannerthat a common portion is recognized from differences in pixel valuesbetween inputted images and the common portion is subjected topredetermined image processing. Accordingly recognition of the commonportion can be carried out with a simple operation.

Further, in the image processing method, only when a difference in pixelvalues which is a result of comparing pixel values between the twoimages is equal to or less than a preset threshold value, the imageprocessing result is outputted. Thus, only a common portion within therange of a set threshold value can be outputted as an image. Forexample, in a case where there are two printed matters in whichhand-written notes are written so as to overlap printed contents, thehand-written notes are different in the respective printed matters, sothat only the printed contents as a common portion can be outputted asan image. As described above, a common portion in which a difference inpixel values is equal to or less than a threshold value can be outputtedas an image processing result, so that image processing such as outputof only a portion common to images can be carried out in a simplemanner.

Still further, in the image processing method, when a difference inpixel values which is a result of comparing pixel values between the twoimages is equal to or less than a preset threshold value, the pixelvalues of the inputted image and the stored image are replaced with avalue of zero, and the respective images are outputted as the imageprocessing result. Thus, an image in which a portion common to one imageand another image is eliminated from the one image can be outputted in asimple manner. For example, in the case of adding a hand-written note toprinted matter, image processing such as leaving only the hand-writtennote and eliminating printed contents can also be carried out. Asdescribed above, an image processing result obtained by eliminating acommon portion in which a difference in pixel values is equal to or lessthan a threshold value can be outputted, so that it is possible in asimple manner to make the apparatus output only a different portionbetween images as the image processing result.

Still further, in the image processing method, images are inputted byreading documents, and pixel values are compared after a positionaldisplacement between the documents is corrected. Thus, pixel values arecompared after a positional displacement between the documents iscorrected, so that it is possible to avoid an effect of the positionaldisplacement between the documents, and make the apparatus recognize aportion common to the images to output an image processing result suchas an output of only the common portion or an output of an image fromwhich the common portion is eliminated. As described above, images to besubjected to image processing are inputted by reading from documents,and a positional displacement between the documents is corrected beforecarrying out a comparison between the images, so that it is avoided thatan inherent common portion is not recognized as a common portion becauseof a positional displacement between the documents, and recognition of acommon portion can be precisely performed.

The invention may be embodied in other specific forms without departingfrom the spirit or essential characteristics thereof. The presentembodiments are therefore to be considered in all respects asillustrative and not restrictive, the scope of the invention beingindicated by the appended claims rather than by the foregoingdescription and all changes which come within the meaning and the rangeof equivalency of the claims are therefore intended to be embracedtherein.

1. An image processing apparatus comprising at least: input means forcarrying out a distribution process of image information associated withan image inputted through an image input mechanism; storing means forstoring image information associated with an image input through theimage input mechanism; comparing means for comparing image informationassociated with an image newly input through said image input mechanismwith image information associated with an image previously stored in thestoring means; output means for outputting from the image processingapparatus pixels generated from the results of comparisons performed bythe comparing means; and a positional displacement detecting device fordetecting a positional displacement relative to said input mechanismbetween a source of a previously input image and a source of an image tobe newly inputted; wherein the comparing means includes calculatingmeans for calculating a difference in pixel values which represent pixeldensities, between image information associated with an image newlyinputted through said input mechanism and image information associatedwith an image previously stored in the storing means, and recognizingmeans for recognizing a portion common to the stored and newly inputimages by comparing an output of the comparing means with a presetthreshold value; wherein the comparing means includes extracting meansfor causing the output means to output from the image forming apparatusonly pixels corresponding to pixels of the stored and newly input imagesrespectively recognized by the recognizing means when the difference inpixel values calculated by the calculating means is equal to or lessthan said preset threshold value and wherein a warning of a positionaldisplacement relative to said input mechanism between a source of apreviously input image and a source of an image to be newly inputted isprovided on a display means in a case where a positional displacement isdetected by said positional displacement detecting device.
 2. The imageprocessing apparatus of claim 1, further comprising: setting means forallowing a user to set said threshold value.
 3. An image processingapparatus comprising at least: input means for carrying out adistribution process of image information associated with an imageinputted through an image input mechanism; storing means for storingimage information associated with an image input through the image inputmechanism; comparing means for comparing image information associatedwith an image newly input through said image input mechanism with imageinformation associated with an image previously stored in the storingmeans; output means for outputting from the image processing apparatuspixels generated from the results of comparisons performed by thecomparing means; and a positional displacement detecting device fordetecting a positional displacement relative to said input mechanismbetween a source of a previously input image and a source of an image tobe newly inputted; wherein the comparing means includes calculatingmeans for calculating a difference in pixel values which represent pixeldensities, between image information associated with an image newlyinputted through said input mechanism and image information associatedwith an image previously stored in the storing means, and recognizingmeans for recognizing a portion common to the stored and newly inputimages by comparing an output of the comparing means with a presetthreshold value; wherein the comparing means includes extracting meansfor causing the output means to output from the image forming apparatusonly pixels corresponding to pixels of the stored and newly input imagesrespectively recognized by the recognizing means when the difference inpixel values calculated by the calculating means is equal to or lessthan said preset threshold value; wherein a comparison result is sent(i) to image processing means including at least one of color correctingmeans, black producing means, filter processing means, halftoneprocessing means and a printing mechanism, or (ii) to said storagemeans; wherein said output means has a further function of sending animage read from said storage means to image processing means includingcolor correcting means; and wherein a warning of a positionaldisplacement relative to said input mechanism between a source of apreviously input image and a source of an image to be newly inputted isprovided on a display means in a case where a positional displacement isdetected by said positional displacement detecting device.